package com.hotel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ht_room_type
 */
@TableName(value ="ht_room_type")
@Data
public class HtRoomType implements Serializable {
    /**
     * 房间编号
     */
    @TableId
    private Long roomTypeNo;

    /**
     * 房间类型名称，双人间、单人间、四人间、钟点房、总统套房等
     */
    private String roomTypeName;

    /**
     * 房间图片
     */
    private String photo;

    /**
     * 参考价格
     */
    private Double price;

    /**
     * 房间标准人数
     */
    private Integer ratedNum;

    /**
     * 床位数
     */
    private Integer bedNum;

    /**
     * 房间数量
     */
    private Integer roomNum;

    /**
     * 已预定数量
     */
    private Integer reservedNum;

    /**
     * 可住房间数
     */
    private Integer availableNum;

    /**
     * 已入住数量
     */
    private Integer checkInNum;

    /**
     * 房间状态编号
     */
    private Long statusNo;

    /**
     * 备注
     */
    private String roomTypeRemark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public HtRoomType(Long roomTypeNo, String roomTypeName) {
        this.roomTypeNo = roomTypeNo;
        this.roomTypeName = roomTypeName;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HtRoomType other = (HtRoomType) that;
        return (this.getRoomTypeNo() == null ? other.getRoomTypeNo() == null : this.getRoomTypeNo().equals(other.getRoomTypeNo()))
            && (this.getRoomTypeName() == null ? other.getRoomTypeName() == null : this.getRoomTypeName().equals(other.getRoomTypeName()))
            && (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(other.getPhoto()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getRatedNum() == null ? other.getRatedNum() == null : this.getRatedNum().equals(other.getRatedNum()))
            && (this.getBedNum() == null ? other.getBedNum() == null : this.getBedNum().equals(other.getBedNum()))
            && (this.getRoomNum() == null ? other.getRoomNum() == null : this.getRoomNum().equals(other.getRoomNum()))
            && (this.getReservedNum() == null ? other.getReservedNum() == null : this.getReservedNum().equals(other.getReservedNum()))
            && (this.getAvailableNum() == null ? other.getAvailableNum() == null : this.getAvailableNum().equals(other.getAvailableNum()))
            && (this.getCheckInNum() == null ? other.getCheckInNum() == null : this.getCheckInNum().equals(other.getCheckInNum()))
            && (this.getStatusNo() == null ? other.getStatusNo() == null : this.getStatusNo().equals(other.getStatusNo()))
            && (this.getRoomTypeRemark() == null ? other.getRoomTypeRemark() == null : this.getRoomTypeRemark().equals(other.getRoomTypeRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRoomTypeNo() == null) ? 0 : getRoomTypeNo().hashCode());
        result = prime * result + ((getRoomTypeName() == null) ? 0 : getRoomTypeName().hashCode());
        result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getRatedNum() == null) ? 0 : getRatedNum().hashCode());
        result = prime * result + ((getBedNum() == null) ? 0 : getBedNum().hashCode());
        result = prime * result + ((getRoomNum() == null) ? 0 : getRoomNum().hashCode());
        result = prime * result + ((getReservedNum() == null) ? 0 : getReservedNum().hashCode());
        result = prime * result + ((getAvailableNum() == null) ? 0 : getAvailableNum().hashCode());
        result = prime * result + ((getCheckInNum() == null) ? 0 : getCheckInNum().hashCode());
        result = prime * result + ((getStatusNo() == null) ? 0 : getStatusNo().hashCode());
        result = prime * result + ((getRoomTypeRemark() == null) ? 0 : getRoomTypeRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", roomTypeNo=").append(roomTypeNo);
        sb.append(", roomTypeName=").append(roomTypeName);
        sb.append(", photo=").append(photo);
        sb.append(", price=").append(price);
        sb.append(", ratedNum=").append(ratedNum);
        sb.append(", bedNum=").append(bedNum);
        sb.append(", roomNum=").append(roomNum);
        sb.append(", reservedNum=").append(reservedNum);
        sb.append(", availableNum=").append(availableNum);
        sb.append(", checkInNum=").append(checkInNum);
        sb.append(", statusNo=").append(statusNo);
        sb.append(", roomTypeRemark=").append(roomTypeRemark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}